package com.tfleo.mealssenger.object;

import com.tfleo.mealssenger.Main;

public class User {
	public static final String IMAGE_PATH = Main.SERVER_URL + "img/user/";
	
	public final int id;
	public final String name;
	public final String imageUrl;
	public final int lastCheckin;
	public final int placeId;
	public final String placeName;
	
	public User(int id, String name, String image, int lastCheckin, int placeId, String placeName) {
		this.id = id;
		this.name = name;
		if(image != null && image.contains("/")) {
			this.imageUrl = image;
		} else {
			this.imageUrl = IMAGE_PATH + image;
		}
		this.lastCheckin = lastCheckin;
		this.placeId = placeId;
		this.placeName = placeName;
	}

	public String toString() {
		return name;
	}
}
